package com.andy.kotlinplay.view.base

import android.os.Bundle
import android.os.Debug
import android.support.v7.app.AppCompatActivity
import org.jetbrains.anko.AnkoLogger
import org.jetbrains.anko.toast

/*
 * Created by kanghuicong on 2018/10/8.
 * Description：
 */
abstract class BaseActivity:AppCompatActivity(),AnkoLogger {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(getLayoutId())
        initListener();
        initData();
    }

    private fun initData() {

    }

    private fun initListener() {

    }

    abstract fun getLayoutId(): Int


    fun myToast(msg:String){
        runOnUiThread{
            toast(msg)
        }
    }
}